﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<PaymentInfo>" %>

<asp:Content ContentPlaceHolderID="JSContent" runat="server">
    <script type="text/javascript" src="../../Scripts/jquery.validate.min.js"></script>
    <script type="text/javascript" src="../../Scripts/jquery.validate.rules.js"></script>
    <script type="text/javascript" src="../../Scripts/Views/Cart/cart.shippingmethod.paymentmethod.js"></script>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <%: Html.Partial("Sidebar") %>
    <div id="main">
        <div class="main-block">
            <h2 class="title">
                <%:"Checkout".Localize() %></h2>
            <div class="main-block-content cart-content clearfix">
                <div class="order-progress">
                    <ul>
                        <li><a href="<%= this.ViewData["CartLinks"].Bind("Index") %>">
                            <%:"Cart".Localize() %></a></li>
                        <li><a href="<%= this.ViewData["CartLinks"].Bind("Checkout") %>">
                            <%:"Address".Localize() %></a></li>
                        <li class="active"><a>
                            <%:"Shipping & Payment".Localize() %></a></li>
                        <li><a>
                            <%:"Confirm".Localize() %></a></li>
                    </ul>
                </div>
                <form id="payment_form" action="<%= this.ViewData["CartLinks"].Bind("Payment")  %>"
                method="post">
                <h6>
                    <%:"Shipping Method".Localize() %></h6>
                <div class="cart-block">
                    <p>
                        <%:"Please select the preferred shipping method to use in this order.".Localize() %></p>
                    <table>
                        <tbody>
                            <% foreach (object item in this.ViewBag.ShippingItems)
                               {
                            %>
                            <tr>
                                <th>
                                    <input type="radio" id="s_<%= item.Bind("Item1") %>" name="Shipping" value="<%= item.Bind("Item1") %>"
                                        <%= (bool)item.Bind("Item3")?"checked=checked":"" %> />
                                </th>
                                <td>
                                    <strong>
                                        <label for="s_<%= item.Bind("Item1") %>">
                                            <%: item.Bind("Item2") %></label></strong>
                                </td>
                            </tr>
                            <%
                               } %>
                            <tr class="error_container_row" style="display: none">
                                <td colspan="2" class="error_container" style="color: Red">
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <h6>
                    <%:"Payment Method".Localize() %></h6>
                <div class="cart-block">
                    <p>
                        <%:"Please select the preferred payment method to use in this order.".Localize() %></p>
                    <table>
                        <tbody>
                            <% foreach (object item in this.ViewBag.PaymentItems)
                               {
                            %>
                            <tr>
                                <th>
                                    <input type="radio" id="p_<%= item.Bind("Item1") %>" name="Payment" value="<%= item.Bind("Item1") %>" <%= (bool)item.Bind("Item3")?"checked=checked":"" %>/>
                                </th>
                                <td>
                                    <strong>
									<label for="p_<%= item.Bind("Item1") %>">
                                        <%: item.Bind("Item2") %></label></strong>
                                </td>
                            </tr>
                            <%
                               } %>
                            <tr class="payment_error_container_row" style="display: none">
                                <td colspan="2" class="error_container" style="color: Red">
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <label for="coupon">
                        <%:"Coupon Code".Localize() %></label><input name="coupon" type="text" value="<%= this.Model.Coupon %>" />
                </div>
                <div class="buttons">
                    <a class="button left" href="<%= this.ViewData["CartLinks"].Bind("Checkout") %>"><span>
                        <%:"« Back".Localize() %></span></a>
                    <button type="submit" class="button right">
                        <em><span>
                            <%:"Confirm Order »".Localize() %></span> </em>
                    </button>
                </div>
                </form>
            </div>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Breadcrumb" runat="server">
    <ul class="breadcrumb">
        <li><a href="/">
            <%:"Home".Localize() %></a>&gt;</li>
        <li>Cart</li>
    </ul>
</asp:Content>
